ParcelTrack API

(0 reviews)

Subscription DELETE

Resource URL

UAT:

https://api.uat.nzpost.co.nz/parceltrack/3.0/subscription/webhook/{subscription_id}
Production:
https://api.nzpost.co.nz/parceltrack/3.0/subscription/webhook/{subscription_id}

Resource Description

Marks an existing subscription as inactive.

Resource Information

AttributeDetail
Response FormatJSON
Requires AuthenticationYes
Rate Limited15 calls per second across all merchants using the API. If rate limit is exceeded, calls will be queued. Calls unprocessed for over 60 seconds will time out.

Request Parameters

Field NameDescriptionMandExample
subscription_guidUnique identifier for a subscription recordYes32ffd9bd-8ea5-4167-85d8-a20d4a5e7a31

Sample Request

https://api.nzpost.co.nz/parceltrack/3.0/subscription/webhook/32ffd9bd-8ea5-4167-85d8-a20d4a5e7a31

Response Parameters

The following lists the required fields in the /labels/domestic response message.

Field NameDescriptionMandExample
successReturns true if request is successful else falseYesTrue
message_idA unique identifier for the API CallYes0d41ffa0-0976-11e5-8fa8-02850e3bb9fb
errorsIf the subscription creation is unsuccessful, an error code and message is providedYes if API call is unsuccessfulSee section Error Object Parameters

Error Response Elements

Field NameDescriptionMandExample
successReturns if request is successfulYesTrue
errorsError object with error detailsY if success =falseSee Error Object Parameters below
message_idThe unique message identifierYesec608f40-2a8b-11e5-a9c0-025c481d35ef

Error Object Parameters

Field NameDescriptionExample
codeError code where first 3 digits are http status code, last three digits identify error type400002
messageDescription of error codeInvalid Parameter(s)
detailsDescription of specific errorSubscription_guid not found

HTTP Status Codes

Note that some error messages are customised for the request, i.e. error code 400 usually will describe what is wrong with the request

CodeMessage
200Success
400Bad request
401Unautorized
403Forbidden
409Invalid request
500System unavailable

Sample Response

Sample: Success


{
   "success": true,
   "message_id": "28eed9bd-8ea5-4167-85d8-a20d4a5e7a42"
}

Sample: Failure


{
   "success": false,
   "errors": [   {
      "code": "400002",
      "message": "Invalid parameter(s)",
     "details": "Subscription_guid not found"
   }],
   "message_id": "28eed9bd-8ea5-4167-85d8-a20d4a5e7a42"
}

Reviews